import { View } from "@tarojs/components";
import { FC } from "@tarojs/taro";
import List from "@/pages/component/customer-list";
import styles from "./index.module.less";
import Category from "@/pages/component/category";
import useData from "./useData";

const Index: FC = () => {
  const { customerList, setSearchObj } = useData();

  return (
    <View className={styles["boy-wrapper"]}>
      <Category
        showTabs={["nativePlace", "residence", "more"]}
        onSearch={(params) => setSearchObj(params)}
      />
      <List list={customerList || []} />
    </View>
  );
};

export default Index;
